//
//  VideoPlayerController.m
//  Tang
//
//  Created by 邓芮 on 15/12/7.
//  Copyright © 2015年 352324497@qq.com. All rights reserved.
//

#import "VideoPlayerController.h"
#import "AppDelegate.h"
#import "MoviePlayer.h"
@interface VideoPlayerController ()

@end

@implementation VideoPlayerController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    MoviePlayer *moviePlayer = [[MoviePlayer alloc]initWithFrame:CGRectMake(0, 0, KHeight, KWidth) url:self.url];
    [moviePlayer.back addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
//    moviePlayer.title.text = self.name;
    moviePlayer.back.textLabel.text = self.name;
    [self.view addSubview:moviePlayer];
    
    
}

- (void)back:(UIButton *)button
{
    AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
    appDelegate.isRotation = NO;
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
